﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ChangePasswordModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>ResetPassword</title>
    <link href="/Content/AdminCSS/LogOn.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function submitForm() {
            if (ValidateResetPassword()) {
                $('#MySubmitForm').submit();
                // suppress default link action
                return true;
            } else {
            return false;
            }
        }
        function ValidateResetPassword() {
            var username = document.getElementsByName("NguoiDung_UserName").item(0);
            if (username.value == "") {
                alert("Please input UserName");
                return false;
            }
            var email = document.getElementsByName("NguoiDung_Email").item(0);
            if (email.value == "") {
                alert("Please input email");
                return false;
            }
            return true;
        }
    </script>
    <script type="text/javascript">
		<% if (ViewData["LoginStatus"] != null){ %>
			alert('<%= ViewData["LoginStatus"] %>');
		<% } %>
	</script>
</head>
    <body>
        <div id="container">
            <div id="header">
                <div class="div1">
                    <a href="<%= Url.Action("Index", "Home") %>" style="font-size: 20px; font-weight: bold; color:#fff; text-decoration: none;">
                        <span><%= WebConfiguration.SiteName %></span>
                    </a>
                </div>
            </div>
            <div id="content">
                <div class="box" style="width: 325px; min-height: 300px; margin-top: 40px; margin-left: auto; margin-right: auto;">
                    <div class="left"></div>
                    <div class="right"></div>
                    <div class="heading">
                        <h1 style="background-image: url('../../Content/Images/LogOn/lockscreen.png');">Thay đổi mật khẩu</h1>
                    </div>
                    <div class="content" style="min-height: 150px;">
                        <% using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { id = "MySubmitForm", onsubmit = "return ValidateResetPassword();" }))
                           { %>
                            <table style="width: 100%;">
                                <tr>
                                    <td>Tên đăng nhập</td>
                                </tr>
                                <tr>
                                    <td>
                                        <%: Html.TextBox("NguoiDung_UserName", "", new { @style = "width: 170px;" })%>
                                        <br />
                                    </td>
                                </tr>
                                <tr>
                                    <td>Email</td>
                                </tr>
                                <tr>
                                    <td>
                                        <%: Html.TextBox("NguoiDung_Email", "", new { @style = "width: 170px;" }) %>
                                        <br />
                                    </td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;">
                                        <a onclick="submitForm()" href="#" class="button">
                                            <span>Reset</span>
                                        </a>
                                    </td>
                                </tr>
                            </table>
                        <% } %>
                    </div>
                </div>
            </div>
        </div>
        <div id="footer">
            <a href="<%= Url.Action("Index", "Home") %>"><%= WebConfiguration.SiteName %></a> &copy; 2010-2011 All Rights Reserved.<br />Version 1.0.0
        </div>
    </body>
</html>
